LongTasks: fix sibling layout test This CL allows the main frame to produce a long task that is observed by the child frame. Such a long task can be detected because the attribution will be same-origin-ancestor. Bug: 927866 Change-Id: I38849b5f44172cbffd25f3ab429b0c1a96b0f1e3 Reviewed-on: https://chromium-review.googlesource.com/c/1480114 Reviewed-by: Timothy Dresser <tdresser@chromium.org> Commit-Queue: Nicolás Peña Moreno <npm@chromium.org> Cr-Commit-Position: refs/heads/master@{#634243} diff --git a/longtask-timing/longtask-in-sibling-iframe.html b/longtask-timing/longtask-in-sibling-iframe.html index b8a4270..16f0998 100644 --- a/longtask-timing/longtask-in-sibling-iframe.html +++ b/longtask-timing/longtask-in-sibling-iframe.html
@@ -14,6 +14,10 @@ } window.addEventListener('message', t.step_func(e => { assert_equals(e.data['entryType'], 'longtask'); + // Ignore any long task that may be produced by the top-level frame. + if (e.data['frame-attribution'] === 'same-origin-ancestor') + return; + assert_equals(e.data['frame-attribution'], 'same-origin'); assert_equals(e.data['task-attribution'], 'unknown'); assert_equals(e.data['containerId'], 'longtask-iframe-id');